home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: calloc help needed
- Date: Sat, 17 Feb 96 22:36:51 GMT
- Organization: none
- Message-ID: <824596611snz@genesis.demon.co.uk>
- References: <1996Feb15.125431.7751@leeds.ac.uk> <4g2vlq$n4k@spanky.pls.ov.com>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4g2vlq$n4k@spanky.pls.ov.com>
- glenn@ov.com "Fletcher.Glenn@ov.com" writes:
-
- >One side effect of calloc() is that the memory set aside is initialized to
- >all zeroes.
-
- That is all-bits-zero internal representation. That doesn't imply that a
- pointer will be null or a floating point number will be 0.0.
-
- ...
-
- >void *calloc(unsigned nelem, unsigned elsize);
-
- The ANSI prototype is:
-
- void *calloc(size_t nelem, size_t elsize);
-
- >From the above you can tell that the function returns a pointer of undetermined
- >type.
-
- It returns a pointer of type void * which is a precisely determined type in
- C. However you can convert that pointer implicitly to a pointer to any type
- other than a function.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-